js how to use .reduce() to get an object with arrays out of a nested object with arrays

join shbcf.ru